package x.amadeus.staff.controller;

import java.util.List;

import javax.annotation.Resource;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;

import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.ResponseBody;

import x.amadeus.staff.domain.StaffInfo;
import x.amadeus.staff.service.StaffService;
import x.amadeus.utils.Result;

@Controller
@RequestMapping("/staff")
public class StaffController {

	@Resource(name="staffService")
	private StaffService staffService;
	
	@RequestMapping("/findAll")
	@ResponseBody
	public Result findAll(HttpServletRequest request, HttpServletResponse response)
	{
		
		Result result = new Result();
		
		List<StaffInfo> staffList = staffService.findAll();
		
		
		result.setCode(1);
		result.setMessage("查询成功");
		result.setData(staffList);
		
		
		return result;		
	}
		
}
